import request from '@/api/axios'

const baseurl = '/webrtc'

export function onIceCandidate(cname, data) {
  return request({
    url: baseurl + '/onIceCandidate',
    method: 'post',
    params: {
      cname,
    },
    data,
  })
}

export function createOffer(data) {
  return request({
    url: baseurl + '/createOffer',
    method: 'post',
    data,
  })
}

export function close() {
  return request({
    url: baseurl + '/close',
    method: 'post',
  })
}
